gen-variants-rndt seed number transpose-value symbol-pattern
This is one of a series of functions that are able to generate a set of variations from a symbol pattern. The 'theme' symbol-pattern is stated first in the output followed sequentially by the number of variants equal to the length of the symbol-pattern.
(setq mel (gen-variants-rndt 0.34 nil nil '(a b c d)))
--> (a b c d c e c e c c a b a a b b c e b b)
The transpose-value sets a top-limit to random control of transposition steps applied to each variant. Minus values are acceptable.
(setq mel1 (gen-variants-rndt 0.34 nil -5 '(a b c d)))
--> (a b c d a c a c -b -b -d -c -d -d -c -c b d a a)
The two optional values in combination:
(setq mel2 (gen-variants-rndt 0.34 3 7 '(a b c d)))
--> (a b c d i g h i i h i h c e e d)
Should you wish to remove the 'theme' from the output statement use the nthcdr function:
(setq mel3 (nthcdr 4 (gen-variants-rndt nil nil nil '(a b c d))))